package com.wuzao;

import com.alibaba.fastjson.JSON;

import java.sql.Array;
import java.util.ArrayList;
import java.util.Optional;

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");

        ArrayList<Integer> objects = new ArrayList<>();
        objects.add(1);
        Optional<Integer> integerOptional = objects.stream().filter(i->i.equals(1)).findFirst();


        int i = integerOptional.isPresent() ? integerOptional.get() : 2;
        System.out.println(i);


        JSON.parseObject(String.valueOf(objects), Object.class);

    }


}